package ma.fsm.arda.command;

import ma.fsm.arda.command.strategy.AutoStrategy;

import org.sintef.jarduino.AnalogPin;
import org.sintef.jarduino.DigitalPin;
import org.sintef.jarduino.DigitalState;
import org.sintef.jarduino.JArduino;
import org.sintef.jarduino.PWMPin;
import org.sintef.jarduino.PinMode;

public class AutoCommand implements Runnable {

	private AutoStrategy strategy;

	public AutoCommand() {

	}

	public AutoCommand(AutoStrategy strategy) {
		super();
		this.strategy = strategy;
	}

	public AutoStrategy getStrategy() {
		return strategy;
	}

	public void setStrategy(AutoStrategy strategy) {
		this.strategy = strategy;
	}

	public void stop() {
		strategy.stop();
	}

	@Override
	public void run() {
		strategy.execute();
	}

}
